package demo;

import java.text.SimpleDateFormat;
import java.util.Scanner;

//Day05
public class Day15002 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy年MM月dd日");
//        输入两个日期
        String firstBirthday= scanner.nextLine();
        String secondBirthday= scanner.nextLine();
//        比较日期，得出哪个在前
        try {
            if((sdf.parse(firstBirthday)).before(sdf.parse(secondBirthday)))
                System.out.println("前者大");
            else
                System.out.println("后者大");

        }catch (Exception e){
            System.out.println(e);
        }

    }
}
